﻿//-----------------------------------------------------------------------
// <copyright file="Attribute.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Attribute class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Models.ClosedWorld
{
    /// <summary>
    /// Represents a tuple attribute within the closed world model.
    /// </summary>
    public class Attribute : ElementBase
    {
        /// <summary>
        /// Gets or sets the name of a selected frame.
        /// </summary>
        public string Frame { get; set; }

        /// <summary>
        /// Gets or sets the name of a projected slot.
        /// </summary>
        public string Slot { get; set; }

        /// <summary>
        /// Gets or sets the instance specifier of a selected frame.
        /// </summary>
        /// <remarks>
        /// Use the instance specifer to distinguish between two or more
        /// selections of instances of the same class frame.
        /// </remarks>
        public int Instance { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the attribute value will be cached at runtime.
        /// </summary>
        public bool Cache { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the tuples are indexed by values of this attribute.
        /// </summary>
        public bool IndexedBy { get; set; }
    }
}
